﻿@model IEnumerable<AplicacionBase.Models.SurveysTopic>

@{
	ViewBag.Title = "Agregar temas a encuesta";
}

<div class="grid">
    <div class="c12 first">
        <h2>Temas asociado a la encuesta <strong><i>@ViewBag.Encuesta.Name</i></strong></></h2>  
        <div class="alert success">
            @TempData["Success"]
        </div>
        <br/>
        <p>
                @Html.ActionLink("Asociar nuevo tema", "Create", new { id = ViewBag.Encuesta.Id }, htmlAttributes: new { @class = "ebutton blue" })
                @Html.ActionLink("Crear nuevo tema", "Create","Topic", new { id = ViewBag.Encuesta.Id }, htmlAttributes: new { @class = "ebutton blue" })
                
            </p>
    </div>
    <div class="c12 first">
        <div class="c9 first"><table>
                                  <tr>       
                                      <th>
                                          Tema
                                      </th>
                                      <th>
                                          Numero de tema
                                      </th>
                                      <th>
                                          Acciones
                                      </th>
                                  </tr>
                                  @{ int i = 0;}
                                  @foreach (var item in Model)
                                  {
                                      if (i%2 == 0)
                                      {
		
                                          @:<tr>
                                      }
                                      else
                                      {
                                          @:<tr class="even">
                                      }
                                      <td>
                                          @Html.DisplayFor(modelItem => item.Topic.Description)
                                      </td>
                                      <td>
                                          @Html.DisplayFor(modelItem => item.TopicNumber)
                                      </td>
                                      <td>
                                          <div class="c12">
                                              <div class="c1 first">
                                                  @Html.ActionLink(" ", "Edit", new { ids = item.IdSurveys, idt = item.IdTopic }, htmlAttributes: new { @class = "btnedit", @title = "Editar" }) 
                                              </div>
                                              <div class="c1">
                                                 @Html.ActionLink(" ", "Delete", new { ids = item.IdSurveys, idt = item.IdTopic }, htmlAttributes: new { @class = "btndelete", @title = "Eliminar" })
                                              </div>
                                              <div class="c1 first">
                                                  
                                              </div>
                                              <div class="c1">
                                                  <div class="boton">
                                                      &#9660;                                       
                                                      @*<img src="@Url.Content("~/Content/themes/base/images/more.png")"/>*@
                                                      <div class="informa">
                                                          <div class="contenido">
                                                              <div class="arrow_box"></div>
                                                              <div class="titulo">Más opciones</div>
                                                              <ul>
                                                                  <li class="lmenu">@Html.ActionLink("Ver preguntas", "Index", "Questions", new { id = item.IdTopic }, null)</li>                                                                 
                                                                  @***************MAS OPCIONES**************************************** *@
                                                                  @*<li><a href="#">Twitter</a></li>
                                                                  <li><a href="#">Email</a></li>*@
                                                              </ul>	
                                                          </div>
                                                      </div>
                                                  </div>
                                              </div>
                                          </div>
                                          
                                          
                                          
                                          
                                      </td>
                                      @:</tr>
                                      i++;
                                  }
                              </table>
            <br />
                @Html.ActionLink("Volver al listado de encuestas", "Index", "Surveys",null, htmlAttributes: new { @class = "ebutton blue" })
        </div>
        <div class="c3 last"> @Html.Partial("_LayoutSideBar")</div>
    </div>
    
    &nbsp;
</div>
   
<script src="@Url.Content("~/Scripts/jquery-1.7.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/menu.js")" type="text/javascript"></script>
